﻿<%@ Page Title="" Language="C#" MasterPageFile="~/giaovien/Manager3.master" AutoEventWireup="true"
    CodeFile="TrangDanhSachLoiHS.aspx.cs" Inherits="giaovien_TrangDanhSachLoiHS" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head1" runat="Server">
    <link href="../CSS/FixItem.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="Server">
    <div style="width: 100%; height: auto;">
        <div id="main_panel" style="width: 100%;">
            <div id="personal_content" style="padding: 10px; border: 1px solid #ccc">
                <div class="personal_top_text">
                    Các lỗi vi phạm của học sinh
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Năm học: </span>
                    <asp:Label runat="server" ID="lblNamHoc"></asp:Label>
                    <asp:Label runat="server" ID="lblMaNam" Visible="false"></asp:Label>
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Học kỳ: </span>
                    <asp:RadioButton runat="server" ID="rdoKyI" GroupName="HocKy" />I&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton runat="server" ID="rdoKyII"  GroupName="HocKy" />II
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Học sinh: </span>
                    <asp:Label runat="server" ID="lblTenHS"></asp:Label>
                    <asp:Label runat="server" ID="lblMaHS" Visible="false"></asp:Label>
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Ngày vi phạm: </span>
                    <asp:TextBox runat="server" ID="txtNgayVP" Width="120px"></asp:TextBox>
                    <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtNgayVP"
                        Format="dd/MM/yyyy" Enabled="true">
                    </asp:CalendarExtender>
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Nghỉ học: </span>
                    <asp:RadioButton runat="server" ID="rdoCoPhep"
                        GroupName="NghiHoc" AutoPostBack="True" 
                        oncheckedchanged="rdoCoPhep_CheckedChanged" />Có phép&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton runat="server" ID="rdoKhongPhep" 
                        GroupName="NghiHoc" AutoPostBack="True" 
                        oncheckedchanged="rdoKhongPhep_CheckedChanged" />Không phép
                </div>
                <div class="personal_style_form">
                    <span class="personal_laber">Lỗi VP khác: </span>
                    <asp:DropDownList runat="server" ID="drLoiVP" Width="120px">
                    </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                    <span >Số lần:</span>
                    <asp:TextBox runat="server" ID="txtSoLan" Width="30px"></asp:TextBox>
                </div>
                <div id="Div2" class="personal_submit clearfix">
                    <asp:Button runat="server" ID="btnThemLoiVP" CssClass="button_150" 
                        Text="Thêm lỗi VP" onclick="btnThemLoiVP_Click" />
                </div>
                <div style="margin-top:20px;">
                    <asp:GridView runat="server" ID="grvLoiVP" AutoGenerateColumns="False" Width="100%"
                        AllowPaging="True" Height="28px" ShowFooter="True" EnableModelValidation="True"
                        ForeColor="Black" onrowdeleting="grvLoiVP_RowDeleting" 
                        onrowediting="grvLoiVP_RowEditing">
                        <RowStyle BackColor="#EFF3FB" BorderStyle="None" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <Columns>
                            <asp:TemplateField HeaderText="STT">
                                <ItemTemplate>
                                    <%# Container.DataItemIndex + 1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Lỗi VP" SortExpression="TenLoiVP">
                                <ItemTemplate>
                                <asp:Label runat="server" ID="lblMaLoiVP" Visible="false" Text='<%#Bind("MaLoiVP") %>'></asp:Label>
                                    <asp:Label runat="server" ID="lblTenLoiVP" Text='<%#Bind("TenLoiVP") %>'></asp:Label>
                                    <%--<%#Eval("TenLoiVP")%>--%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Ngày VP" SortExpression="NgayVP">
                                <ItemTemplate>
                                   <asp:Label runat="server" ID="lblNgayVP" Text='<%#String.Format("{0:dd/MM/yyyy}", Eval("NgayVP"))%>'></asp:Label> 
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Số lần VP" SortExpression="SoLanVP">
                                <ItemTemplate>
                                    <%#Eval("SoLanVP")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowEditButton="true" ButtonType="Image" HeaderText="Cập nhật" EditImageUrl="~/Icon/edit.ico"
                                ControlStyle-Height="25px" EditText="Sửa" />
                            <asp:CommandField ShowDeleteButton="true" ButtonType="Image" HeaderText="Xóa" DeleteImageUrl="~/Icon/cancel.ico"
                                ControlStyle-Height="25px" DeleteText="Xóa" />
                        </Columns>
                        <HeaderStyle BackColor="#9999FF" Font-Bold="True" BorderColor="Blue" Height="30px"
                            ForeColor="#333333" />
                        <PagerStyle BackColor="#E4ECEF" HorizontalAlign="Left" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </div>
                <div style="margin-top:20px;">
                <span style="margin-right:350px;"><asp:ImageButton runat="server" ID="imbBack" 
                            ImageUrl="~/Icon/back.ico" Height="50px" Width="100px" 
                        onclick="imbBack_Click"  />
                            </span>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
